package org.ktpro.shortlink.project.handle;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.ktpro.shortlink.project.common.convention.result.Result;
import org.ktpro.shortlink.project.dto.req.ShortLinkCreateReqDTO;
import org.ktpro.shortlink.project.dto.resp.ShortLinkCreateRespDTO;


public class CustomBlockHandler {

    /**
     * 流控限制处理。这里是抛出异常
     */
    public static Result<ShortLinkCreateRespDTO> createShortLinkBlockHandlerMethod(ShortLinkCreateReqDTO requestParam, BlockException exception) {
        return new Result<ShortLinkCreateRespDTO>().setCode("B100000").setMessage("当前访问网站人数过多，请稍后再试...");
    }
}
